<%-- <%@page buffer="none" %> --%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"  %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>测试EL表达式</title>
</head>
<body>
<h1>测试EL表达式</h1>
<% 
String name=request.getParameter("name");
String age=request.getParameter("age");

pageContext.setAttribute("name", "李四");//不写scope参数表示默认值PageContext.PAGE_SCOPE
pageContext.setAttribute("age", 18, PageContext.PAGE_SCOPE);

request.setAttribute("name", "王五");
request.setAttribute("age", 19);

session.setAttribute("name", "杨柳");
session.setAttribute("age", 20);

application.setAttribute("name", name);
application.setAttribute("age", age);

((HttpServletRequest)pageContext.getRequest()).getRequestURL();
pageContext.getSession().getId();
pageContext.getServletContext().getServerInfo();
%>
\${888*999}=${888*999}<br>

\${null}=${null}<br>
\${name}=${name}<br>
\${age}=${age}<br>
request.getRequestURL()=<%= request.getRequestURL() %><br>
\${requestScope.requestURL}=${requestScope.requestURL}<br>
request.getAttribute("name")=<%= request.getAttribute("name") %><br>
\${pageContext.request.requestURL}=${pageContext.request.requestURL}<br>

session.getId()=<%= session.getId() %>
\${pageContext.session.id}=${pageContext.session.id}<br>

application.getServerInfo()=<%= application.getServerInfo() %><br>
\${pageContext.servletContext.serverInfo}=${pageContext.servletContext.serverInfo}<br>
<%
// response.flushBuffer();
// response.sendRedirect("j2.jsp");
%>

<%-- <jsp:forward page="j2.jsp" ></jsp:forward> --%>
</body>
</html>